package uicgas.register.GUI;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.SpringLayout;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import javax.swing.JSeparator;

public class PassswordChange extends JFrame
{

	private JPanel contentPane;
	private JPasswordField passwordField;
	private JPasswordField passwordField_1;
	private JButton btnCancel;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args)
	{
		EventQueue.invokeLater(new Runnable()
		{
			public void run()
			{
				try
				{
					PassswordChange frame = new PassswordChange();
					frame.setVisible(true);
				}
				catch (Exception e)
				{
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public PassswordChange()
	{
		setTitle("UIC Gas - Password Change");
		setResizable(false);
		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		setBounds(100, 100, 500, 493);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		SpringLayout sl_contentPane = new SpringLayout();
		contentPane.setLayout(sl_contentPane);
		
		JLabel lblPleaseInputThe = new JLabel("Please input the new password for the system.");
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblPleaseInputThe, 78, SpringLayout.NORTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.WEST, lblPleaseInputThe, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, lblPleaseInputThe, 0, SpringLayout.EAST, contentPane);
		lblPleaseInputThe.setHorizontalAlignment(SwingConstants.CENTER);
		lblPleaseInputThe.setFont(new Font("Tahoma", Font.PLAIN, 18));
		contentPane.add(lblPleaseInputThe);
		
		passwordField = new JPasswordField();
		sl_contentPane.putConstraint(SpringLayout.NORTH, passwordField, 106, SpringLayout.NORTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, lblPleaseInputThe, -6, SpringLayout.NORTH, passwordField);
		sl_contentPane.putConstraint(SpringLayout.WEST, passwordField, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, passwordField, 0, SpringLayout.EAST, contentPane);
		passwordField.setHorizontalAlignment(SwingConstants.CENTER);
		passwordField.setFont(new Font("Tahoma", Font.PLAIN, 18));
		contentPane.add(passwordField);
		
		JLabel lblEnterPasswordAgain = new JLabel("Enter Password Again");
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblEnterPasswordAgain, 210, SpringLayout.NORTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, passwordField, -16, SpringLayout.NORTH, lblEnterPasswordAgain);
		sl_contentPane.putConstraint(SpringLayout.WEST, lblEnterPasswordAgain, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, lblEnterPasswordAgain, 0, SpringLayout.EAST, contentPane);
		lblEnterPasswordAgain.setHorizontalAlignment(SwingConstants.CENTER);
		lblEnterPasswordAgain.setFont(new Font("Tahoma", Font.PLAIN, 18));
		contentPane.add(lblEnterPasswordAgain);
		
		passwordField_1 = new JPasswordField();
		sl_contentPane.putConstraint(SpringLayout.NORTH, passwordField_1, 250, SpringLayout.NORTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.WEST, passwordField_1, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, passwordField_1, 0, SpringLayout.EAST, contentPane);
		passwordField_1.setHorizontalAlignment(SwingConstants.CENTER);
		passwordField_1.setFont(new Font("Tahoma", Font.PLAIN, 18));
		contentPane.add(passwordField_1);
		
		JButton btnOk = new JButton("OK");
		sl_contentPane.putConstraint(SpringLayout.SOUTH, passwordField_1, -6, SpringLayout.NORTH, btnOk);
		sl_contentPane.putConstraint(SpringLayout.NORTH, btnOk, 344, SpringLayout.NORTH, contentPane);
		btnOk.setFont(new Font("Tahoma", Font.PLAIN, 16));
		sl_contentPane.putConstraint(SpringLayout.WEST, btnOk, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, btnOk, 485, SpringLayout.WEST, contentPane);
		contentPane.add(btnOk);
		
		btnCancel = new JButton("Cancel");
		sl_contentPane.putConstraint(SpringLayout.SOUTH, btnOk, -6, SpringLayout.NORTH, btnCancel);
		btnCancel.setFont(new Font("Tahoma", Font.PLAIN, 16));
		sl_contentPane.putConstraint(SpringLayout.NORTH, btnCancel, -61, SpringLayout.SOUTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.WEST, btnCancel, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, btnCancel, -10, SpringLayout.SOUTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.EAST, btnCancel, 485, SpringLayout.WEST, contentPane);
		contentPane.add(btnCancel);
		
		JSeparator separator = new JSeparator();
		sl_contentPane.putConstraint(SpringLayout.WEST, separator, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, separator, -6, SpringLayout.NORTH, lblPleaseInputThe);
		sl_contentPane.putConstraint(SpringLayout.EAST, separator, 0, SpringLayout.EAST, contentPane);
		contentPane.add(separator);
		
		JLabel lblYouHaveRequested = new JLabel("You have requested to change the recommission password.");
		lblYouHaveRequested.setHorizontalAlignment(SwingConstants.CENTER);
		lblYouHaveRequested.setFont(new Font("Tahoma", Font.PLAIN, 18));
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblYouHaveRequested, 5, SpringLayout.NORTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.WEST, lblYouHaveRequested, 0, SpringLayout.WEST, contentPane);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, lblYouHaveRequested, -5, SpringLayout.NORTH, separator);
		sl_contentPane.putConstraint(SpringLayout.EAST, lblYouHaveRequested, 0, SpringLayout.EAST, contentPane);
		contentPane.add(lblYouHaveRequested);
	}
}
